<template>
  <div class="netManageMent-monitor">
    <div class="left">
      <div class="netManageMent-monitor-title">网络管理</div>
      <div class="netManageMent-monitor-menu-main">
        <ul>
          <li>
            <span>设备名称</span>
            <span>网络状态</span>
          </li>
          <li v-for="( k , i ) in tableData" :key="i">
            <span>{{k.name}}</span>
            <span
              :style="{'color': (k.atv == 0 || k.atv == '0' ? '#0AD837' : '#ED0512') }"
            >{{(k.atv == 0 || k.atv == '0' ? '正常' : '异常')}}</span>
          </li>
        </ul>
      </div>
    </div>
    <div class="divider"></div>
    <div class="right">
      <iframe
        class="iframe"
        frameborder="0"
        src="http://10.192.102.46:28885/share?url=displays/6d53eaf2-65b0-43bc-b6b7-2eaac7097fec.json"
      ></iframe>
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
@Component
export default class extends Vue {
  tableData = [
    {
      name: "服务器",
      atv: 0,
    },
    {
      name: "服务器2",
      atv: 1,
    },
    {
      name: "服务器3",
      atv: 0,
    },
  ];
}
</script>

<style lang="scss" scoped>
.netManageMent-monitor {
  ul li {
    list-style: none;
    display: flex;
    height: 0.5rem;
    line-height: 0.5rem;
    border: 1px solid rgb(158, 157, 157);
    text-align: center;
    background: #163186;
    &:last-child {
      border-bottom: 2px solid rgb(158, 157, 157);
    }
    &:first-child {
      font-size: 18px;
      background: #1b3cb4;
    }
    span {
      flex: 1;
      border-left: 1px solid rgb(158, 157, 157);
      border-right: 1px solid rgb(158, 157, 157);
    }
    span:nth-child(1) {
      flex: 2;
    }
  }
  width: 100%;
  height: 100%;
  display: flex;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  padding: 0.88rem 0.24rem 0.24rem;
  margin: 0;
  color: #fff;
  .divider {
    position: fixed;
    margin-top: 0.35rem;
    width: 100%;
    height: 2px;
    background: rgb(158, 157, 157);
  }

  .right {
    position: relative;
    padding: 0.5rem;
    box-sizing: border-box;
    flex: 1;
    height: 100%;
    .iframe {
      width: 100%;
      height: 100%;
      position: absolute;
      // top: 0.5rem;
      z-index: 1;
      background: none;
      pointer-events: none;
    }
  }
  .left {
    width: 3.03rem;
    height: 100%;
  }
  &-title {
    width: 100%;
    height: 0.4rem;
    font-size: 0.2rem;
    line-height: 0.4rem;
  }

  &-menu-main {
    margin-top: -3px;
    width: 100%;
    height: calc(100% - 0.4rem);
  }
}
</style>

